import request from '@/utils/request';
const apiUrls = {
  getTech: '/front/farming/tech',
  getMachine: '/front/farming/machine',
  getSupply: '/front/farming/supply',
  getPest: '/front/farming/pest',
  getDisaster: '/front/farming/disaster',
  getOverview: '/front/farming/overview',
  getClassroom: '/front/farming/classroom',
};
export function getTech(areaCode) {
  return request({
    url: `${apiUrls.getTech}?areaCode=${areaCode}`,
    method: 'get',
  });
}

export function getMachine(data) {
  return request({
    url: `${apiUrls.getMachine}?areaCode=${data}`,
    method: 'get',
  });
}
export function getSupply(data) {
  return request({
    url: `${apiUrls.getSupply}?areaCode=${data}`,
    method: 'get',
  });
}
export function getPest(areaCode, pageSize, pageNum) {
  return request({
    url: `${apiUrls.getPest}?pageSize=${pageSize}&pageNum=${pageNum}&areaCode=${areaCode}`,
    method: 'get',
  });
}
export function getDisaster(data) {
  return request({
    url: `${apiUrls.getDisaster}?areaCode=${data}`,
    method: 'get',
  });
}
export function getOverview(data) {
  return request({
    url: `${apiUrls.getOverview}?areaCode=${data}`,
    method: 'get',
  });
}
export function getClassroom(areaCode) {
  return request({
    url: `${apiUrls.getClassroom}?areaCode=${areaCode}`,
    method: 'get',
  });
}